package com.tdkj.model.website;

import java.sql.Timestamp;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.tdkj.model.base.BaseEntity;
import com.tdkj.model.user.BeanUser;

/**
 * XnkyProtocolDetail entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "website_protocol_detail")
public class BeanProtocolDetail extends BaseEntity{

	// Fields
	private BeanUser user;
	private BeanProtocol protocol;
	private Timestamp createtime;

	// Constructors

	/** default constructor */
	public BeanProtocolDetail() {
	}

	/** full constructor */
	public BeanProtocolDetail(long id,BeanProtocol protocol, Timestamp createtime) {
		this.setId(id);
		this.protocol = protocol;
		this.createtime = createtime;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "protocolid")
	public BeanProtocol getProtocol() {
		return this.protocol;
	}
	
	public void setProtocol(BeanProtocol protocol) {
		this.protocol = protocol;
	}
    
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "userid")
	public BeanUser getUser() {
		return this.user;
	}
	
	public void setUser(BeanUser user) {
		this.user = user;
	}
	
	@Column(name = "createtime",length = 19)
	public Timestamp getCreatetime() {
		return this.createtime;
	}

	public void setCreatetime(Timestamp createtime) {
		this.createtime = createtime;
	}

}